;Assembler header file for Button
;written by DefMod (Dec 31 2005) on Sat Dec 31 14:07:19 2005
;Jonathan Coxhead, jonathan@doves.demon.co.uk, 5 Sept 1995

        [       :LNOT: :DEF: Button_Hdr
        GBLS    Button_Hdr

        [       :LNOT: :DEF: Get_Types
        GBLS    Get_Types
        ]
        [       :LNOT: :DEF: Types_Hdr
Get_Types                       SETS    "GET oslib/Types.Hdr"
        |
Get_Types                       SETS    ""
        ]
        $Get_Types

        [       :LNOT: :DEF: Get_Toolbox
        GBLS    Get_Toolbox
        ]
        [       :LNOT: :DEF: Toolbox_Hdr
Get_Toolbox                     SETS    "GET oslib/Toolbox.Hdr"
        |
Get_Toolbox                     SETS    ""
        ]
        $Get_Toolbox

        [       :LNOT: :DEF: Get_Gadget
        GBLS    Get_Gadget
        ]
        [       :LNOT: :DEF: Gadget_Hdr
Get_Gadget                      SETS    "GET oslib/Gadget.Hdr"
        |
Get_Gadget                      SETS    ""
        ]
        $Get_Gadget

;Symbols for constants
Class_Button                    *       &3C0
Button_TaskSpriteArea           *       &1
Button_AllowMenuClicks          *       &2

;Symbols for structure offsets and sizes
                                ^       0
Button_Gadget_flags             #       Bits
Button_Gadget_value             #       Toolbox_MsgReference
Button_Gadget_value_limit       #       Int
Button_Gadget_validation        #       Toolbox_StringReference
Button_Gadget_validation_limit  #       Int
Button_Gadget                   *       @

                                ^       0
Button_Object                   Gadget_Object_MEMBERS
Button_Object_button_flags      #       Bits
Button_Object_value             #       Toolbox_MsgReference
Button_Object_value_limit       #       Int
Button_Object_validation        #       Toolbox_StringReference
Button_Object_validation_limit  #       Int
Button_Object                   *       @


;Symbols for SWI's and SWI reason codes
Button_GetFlags                 *       &3C0
   ;Entry
   ;  R0 = flags (Bits)
   ;  R1 = window (Toolbox_O)
   ;  R2 = &3C0
   ;  R3 = button (Toolbox_C)
   ;Exit
   ;  R0 = icon_flags (Bits)

Button_SetFlags                 *       &3C1
   ;Entry
   ;  R0 = flags (Bits)
   ;  R1 = window (Toolbox_O)
   ;  R2 = &3C1
   ;  R3 = button (Toolbox_C)
   ;  R4 = clear_word (Int)
   ;  R5 = eor_word (Int)

Button_SetValue                 *       &3C2
   ;Entry
   ;  R0 = flags (Bits)
   ;  R1 = window (Toolbox_O)
   ;  R2 = &3C2
   ;  R3 = button (Toolbox_C)
   ;  R4 -> value (String)

Button_GetValue                 *       &3C3
   ;Entry
   ;  R0 = flags (Bits)
   ;  R1 = window (Toolbox_O)
   ;  R2 = &3C3
   ;  R3 = button (Toolbox_C)
   ;  R4 = buffer (pointer to String)
   ;  R5 = size (Int)
   ;Exit
   ;  R5 = used (Int)

Button_SetValidation            *       &3C4
   ;Entry
   ;  R0 = flags (Bits)
   ;  R1 = window (Toolbox_O)
   ;  R2 = &3C4
   ;  R3 = button (Toolbox_C)
   ;  R4 -> validation (String)

Button_GetValidation            *       &3C5
   ;Entry
   ;  R0 = flags (Bits)
   ;  R1 = window (Toolbox_O)
   ;  R2 = &3C5
   ;  R3 = button (Toolbox_C)
   ;  R4 = buffer (pointer to String)
   ;  R5 = size (Int)
   ;Exit
   ;  R5 = used (Int)

Button_SetFont                  *       &3C6
   ;Entry
   ;  R0 = flags (Bits)
   ;  R1 = window (Toolbox_O)
   ;  R2 = &3C6
   ;  R3 = button (Toolbox_C)
   ;  R4 -> font_name (String)
   ;  R5 = xsize (Int)
   ;  R6 = ysize (Int)

        ]
        END
